package bible.sunflower.util.webservice;

import java.net.URL;

import org.apache.log4j.Logger;
import org.codehaus.xfire.client.Client;

public class XFire4WSHelper {
	
	private static Logger log = Logger.getLogger( XFire4WSHelper.class );
	
	public static Object[] callSampleWS( String wsdlURL, String methodName, Object[] params ){
		Object[] results = null;
		try {
			Client client = new Client(new URL( wsdlURL ));
			
			results = client.invoke( methodName,  params );
		} catch (Exception e) {
			e.printStackTrace();
			log.error("call ws error...", e);
		}
		return results;
	}

}
